package com.example.zookeeper.services;

import org.apache.curator.framework.CuratorFramework;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Service;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2021/9/2 13:18
 */
@Service
public class StartService implements ApplicationRunner {
    @Autowired
    private CuratorFramework curatorFramework;

    //    @Autowired
    //    private ListenerService listenerService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        curatorFramework.start();
    }
}
